package com.qiku.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qiku.course.entity.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

@Mapper
public interface CourseMapper extends BaseMapper<Course> {
    /**
     * 查询全部课程
     * @return
     */
    public List<Course> getAllCourse();

    /**
     * 查询已登录用户购买的课程
     * @param userId
     * @return
     */
    public List<Course> getCoursesByUserId(@Param("userId")Integer userId);

    /**
     * 查询某门课程的详细信息
     * @param courseId
     * @return
     */
    public List<Course> getCourseById(@Param("courseId") Integer courseId);

}
